<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ru"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Lion.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">untitled</a> &gt; <a href="index.source.html" class="el_package">com.example</a> &gt; <span class="el_source">Lion.java</span></div><h1>Lion.java</h1><pre class="source lang-java linenums">package com.example;

import java.util.List;

public class Lion {
    Feline feline;
    boolean hasMane;
<span class="fc" id="L8">    public Lion(String sex, Feline feline) throws Exception {</span>
<span class="fc bfc" id="L9" title="All 2 branches covered.">        if (&quot;Самец&quot;.equals(sex)) {</span>
<span class="fc" id="L10">            hasMane = true;</span>
<span class="fc bfc" id="L11" title="All 2 branches covered.">        } else if (&quot;Самка&quot;.equals(sex)) {</span>
<span class="fc" id="L12">            hasMane = false;</span>
        } else {
<span class="fc" id="L14">            throw new Exception(&quot;Используйте допустимые значения пола животного - Самец или Самка&quot;);</span>
        }
<span class="fc" id="L16">        this.feline=feline;</span>
<span class="fc" id="L17">    }</span>

    public int getKittens() {
<span class="fc" id="L20">        return feline.getKittens();</span>
    }
    public boolean doesHaveMane() {
<span class="fc" id="L23">        return hasMane;</span>
    }
    public List&lt;String&gt; getFood() throws Exception {
<span class="fc" id="L26">        return feline.getFood(&quot;Хищник&quot;);</span>
    }
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html>